// import React from "react";
import "./index.less";

export default function Loading(props?: { text?: string }) {
  const { text = "加载中..." } = props || {};
  return (
    <div className="loading-box">
      <div className="loading-icon"></div>
      <div className="loading-text">
        {text.split("").map((t, index) => (
          <span key={index} style={{ "--delay": `${0.12 * index}s` } as any}>
            {t}
          </span>
        ))}
      </div>
    </div>
  );
}
